﻿include(SelectLibraryConfigurations)

find_path(OSGQT_INCLUDE_DIR 
    NAMES osgQOpenGL/osgQOpenGLWidget
    HINTS
    ENV OSGQT_ROOT
    ENV OSGQT_DIR
    ENV OSG_DIR
    ENV OSGDIR
    ENV OSG_ROOT
    PATH_SUFFIXES include
)

find_library(OSGQT_LIBRARY_RELEASE
    NAMES osgQOpenGL
    HINTS
    ENV OSGQT_ROOT
    ENV OSGQT_DIR
    ENV OSG_DIR
    ENV OSGDIR
    ENV OSG_ROOT
    PATH_SUFFIXES lib
)

find_library(OSGQT_LIBRARY_DEBUG
    NAMES osgQOpenGLd
    HINTS
    ENV OSGQT_ROOT
    ENV OSGQT_DIR
    ENV OSG_DIR
    ENV OSGDIR
    ENV OSG_ROOT
    PATH_SUFFIXES lib
)

select_library_configurations(OSGQT)


message(STATUS "OSGQT_INCLUDE_DIR:${OSGQT_INCLUDE_DIR}")
message(STATUS "OSGQT_LIBRARY:${OSGQT_LIBRARY}")

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgQt  REQUIRED_VARS OSGQT_LIBRARY OSGQT_INCLUDE_DIR)